package com.etoak.service.impl;

import com.etoak.entity.Territory;
import com.etoak.mapper.TerritoryMapper;
import com.etoak.service.ITerritoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TerritoryServiceImpl implements ITerritoryService {

    @Autowired
    TerritoryMapper territoryMapper;

    @Override
    public List<Territory> getTerritory(Territory territory) {
        return territoryMapper.getTerritory(territory);
    }

    @Override
    public int add(Territory territory) {
        return territoryMapper.addTerritory(territory);
    }

    @Override
    public int deleteTerritory(String[] territoryId) {
        return territoryMapper.deleteTerritory(territoryId);
    }
}
